#include "main.h"

void main()
{
	const string FILENAME("movies.txt");

	ifstream input(FILENAME);

	if( input.good() )
	{
		while( !input.eof() )
		{
			string name;
			int rating;
			int budget;
			int revenue;
			string reviewFilePath;
			getline( input, name );
			input >> rating >> budget >> revenue;
			input.ignore(1);//ignore the newline char at the end of the line
			getline( input, reviewFilePath);

			//create Movie object here!
			Movie mov(name, (Rating)rating, budget, revenue, reviewFilePath);
			//write out report line for movie here!
			cout << mov << endl << endl;
		}

		input.close();
	}
	else
	{
		cout << "File not found: " << FILENAME << endl;
	}

	system("pause");
}